package com.house365.core.view;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.house365.core.R;

public class ListFooterView  extends RelativeLayout {

	private TextView textView;
	private ProgressBar progressbar;

	public ListFooterView(Context context, AttributeSet attrs) {
		super(context, attrs);
		initialize(context);

	}
	
	public ListFooterView(Context context) {
		super(context);
		initialize(context);
	}

	private void initialize(Context context) {
		View view = LayoutInflater.from(context).inflate(R.layout.pull_to_item_footer, null);
		textView = (TextView) view.findViewById(R.id.more);
		progressbar = (ProgressBar)view.findViewById(R.id.more_progress);
		addView(view);
	}
	
	public void setTextView(int resid) {
		textView.setText(resid);
	}
	
	public void setPBGone(){
		progressbar.setVisibility(View.GONE);
	}
	
	public void setPBVisible(){
		progressbar.setVisibility(View.VISIBLE);
	}
}
